-- GENERATED SPELL FOR [Spirit Shade] --


function spell0_15261(pUnit, Event) --@Dark Offering,Heal--
pUnit:FullCastSpellOnTarget(24804,pUnit)
pUnit:RegisterEvent('Sorts_15261', 614, 1)
end

function spell1_15261(pUnit, Event) --@Spirit Shade Visual,Self--
pUnit:FullCastSpellOnTarget(24809,pUnit)
pUnit:RegisterEvent('Sorts_15261', 542, 1)
end

function Sorts_15261(pUnit, Event)
local choix_sorts_15261 = math.random(0, 1)
if choix_sorts_15261 == 0 then
pUnit:RegisterEvent('spell0_15261', 1, 1)
end
if choix_sorts_15261 == 1 then
pUnit:RegisterEvent('spell1_15261', 1, 1)
end
end

function mob15261_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15261', math.random(1500, 3000), 1)
end

function mob15261_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15261_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15261_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15261, 1, 'mob15261_Action')
RegisterUnitEvent(15261, 2, 'mob15261_Leave')
RegisterUnitEvent(15261, 3, 'mob15261_Kill')
RegisterUnitEvent(15261, 4, 'mob15261_Die')
